﻿/// We are given a string containing a list of forbidden words and a text containing some of these words.
/// Write a program that replaces the forbidden words with asterisks.
/// Example: Microsoft announced its next generation PHP compiler today. It is based on .NET Framework 4.0 and is implemented as a dynamic language in CLR.
/// Words: "PHP, CLR, Microsoft"
///The expected result: ********* announced its next generation *** compiler today. 
///It is based on .NET Framework 4.0 and is implemented as a dynamic language in ***.


using System;
using System.Text.RegularExpressions;

class zad9
{
    static void Main()
    {
        string message = "Microsoft announced its next generation PHP compiler today. It is based on .NET Framework 4.0 and is implemented as a dynamic language in CLR.";
        string words = "PHP, CLR, Microsoft";
        /// tank you http://forums.academy.telerik.com/user/jasssonpet
        Console.WriteLine(Regex.Replace(message, words.Replace(", ", "|"), m => new String('*', m.Length)));
    }

}

